package com.example.lib_common.base;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;

public abstract class BaseFragment extends Fragment {
    //根View
    public View view;

    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
        view = inflater.inflate(getLayoutRes(),container,false);

        initView();
        return view;
    }

    /**
     * 返回实现类的布局文件
     * @return
     */
    protected abstract int getLayoutRes();

    protected  abstract void initView();

}
